# use third libs
set(cpr_DIR ${COMMON_THIRD_LIB}/cpr)

# =============================================================================
# Find packages
macro(use_cpr ag_project_name)
  target_compile_definitions(${ag_project_name} PRIVATE USE_LIB_CPR)
  target_compile_definitions(${ag_project_name} PRIVATE USE_LIB_CURL)
  target_include_directories(${ag_project_name} PRIVATE ${cpr_DIR}/include)
  
  target_include_directories(${ag_project_name} PRIVATE ${cpr_DIR}/build/cpr_generated_includes)  
  target_include_directories(${ag_project_name} PRIVATE ${cpr_DIR}/build/_deps/curl-src/include)

  target_link_directories(${ag_project_name} PRIVATE ${cpr_DIR}/build/lib/$<CONFIG>)

  target_link_libraries(${ag_project_name} PRIVATE cpr libcurl$<$<CONFIG:Debug>:-d>)
endmacro(use_cpr)